<?php

class MW_Simplenews_Block_Adminhtml_Category_Edit_Tab_Meta extends Mage_Adminhtml_Block_Widget_Form 
{
  protected function _prepareForm()
  {
      $form = new Varien_Data_Form();
      $this->setForm($form);
      $form->setHtmlIdPrefix('meta');
      $fieldset = $form->addFieldset('simplenews_meta', array('legend'=>Mage::helper('simplenews')->__('Meta information')));
     
      $fieldset->addField('meta_title', 'text', array(
          'label'     => Mage::helper('simplenews')->__('Meta Title'),
          'class'     => 'required-entry',
          'required'  => true,
          'name'      => 'meta_title',
      ));

      $fieldset->addField('meta_keywords', 'text', array(
          'label'     => Mage::helper('simplenews')->__('Meta KeyWords'),
          'required'  => true, 
          'name'      => 'meta_keywords',
          'after_element_html' => "Các từ cách nhau dấu phẩy (,)",
	    ));

      $fieldset->addField('meta_description', 'text', array(
          'label'     => Mage::helper('simplenews')->__('Meta Description'),
          'required'  => true, 
          'name'      => 'meta_description',
      ));
     
     
      if ( Mage::getSingleton('adminhtml/session')->getSimplenewsData())
      {
          $form->setValues(Mage::getSingleton('adminhtml/session')->getSimplenewsData());
          Mage::getSingleton('adminhtml/session')->setSimplenewsData(null);
      } elseif ( Mage::registry('simplenews_data') ) {
          $form->setValues(Mage::registry('simplenews_data')->getData());
      }
      return parent::_prepareForm();
  }
}